<template>
  <div class="child">
    <h2>我是组件Child组件</h2>
    <Grandson />
  </div>
</template>

<script>
import Grandson from "./Grandson.vue";

export default {
  name: "Child",
  components: { Grandson },
    // 创建之前
    beforeCreate() {
    console.log("Child 创建之前");
  },
  // // 挂载  出生
  // mounted() {
  //   console.log("Child挂载");
  // },
};
</script>

<style scoped>
.child {
  background-color: skyblue;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 0 10px;
}
</style>